from sqlalchemy.orm import Session

from crud import InterviewAdminCrud
from schema.QuerySchema import QueryBase, InterviewQuery
from schema.TeachingSchema import InterviewInfo, InterviewContentInfo


class InterviewAdminController:

    @staticmethod
    def add_interview(interviewInfo: InterviewInfo, db: Session):
        return InterviewAdminCrud.add_interview(interviewInfo, db)

    @staticmethod
    def mod_interview(interviewInfo: InterviewInfo, db: Session):
        return InterviewAdminCrud.mod_interview(interviewInfo, db)

    @staticmethod
    def query_interview_by_field(interviewQuery: InterviewQuery, db: Session):
        return InterviewAdminCrud.query_interview_by_field(interviewQuery, db)

    @staticmethod
    def query_interview_by_page(query_base: QueryBase, db: Session):
        return InterviewAdminCrud.query_interview_by_page(query_base, db)

    @staticmethod
    def add_interview_content(interviewContentInfo: InterviewContentInfo, db: Session):
        return InterviewAdminCrud.add_interview_content(interviewContentInfo, db)

    @staticmethod
    def mod_interview_content(interviewContentInfo: InterviewContentInfo, db: Session):
        return InterviewAdminCrud.mod_interview_content(interviewContentInfo, db)

    @staticmethod
    def query_interview_content_by_field(interview_id: int, db: Session):
        return InterviewAdminCrud.query_interview_content_by_field(interview_id, db)
